import type { AddCollectionsParams, CollectionsParams, CollectionsRecord, CollectionsResultModel } from './model/creatorModel';
import { ContentTypeEnum } from '/@/enums/httpEnum';
import { http } from '/@/utils/http';



//收藏集列表
export function queryCollectionsPage(params: CollectionsParams) {
  return http.post<CollectionsResultModel>({
    url: '/api/web/collections/collections/page',
    params,
  });
}


/**
 * 新增收藏集
 * @param params AddCollectionsParams
 * @returns CollectionsResultModel
 */
export function addCollections(params: AddCollectionsParams) {
  return http.post<CollectionsResultModel>({
    url: '/api/web/collections/collections/add',
    params,
  });
}

/**
 * 修改专栏
 * @param params CollectionsResultModel
 * @returns AddCollectionsParams
 */
export function updateCollections(params: CollectionsRecord) {
  return http.post<CollectionsResultModel>({
    url: '/api/web/collections/collections/update',
    headers: {
      'Content-Type': ContentTypeEnum.JSON,
    },
    params,
  });
}
